package com.wilmer.ai.service;

import com.wilmer.ai.dto.userChatDto;
import com.wilmer.ai.request.ChatRequest;
import com.wilmer.ai.response.ChatResponse;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

import javax.servlet.http.HttpServletRequest;

/**
 * 描述：
 * @author hans 24426
 */
public interface SseService {
    /**
     * 创建SSE
     */
    SseEmitter createSse(String uid);

    /**
     * 关闭SSE
     */
    void closeSse(String uid);

    /**
     * 客户端发送消息到服务端
     */
    ChatResponse sseChat(String uid, ChatRequest chatRequest, HttpServletRequest request);

    ChatResponse sseChatWithAi(String uid, ChatRequest chatRequest);

    SseEmitter chatWithAi( userChatDto chatDto);
}
